package dao

import "gorm.io/gorm"

type Article struct {
	gorm.Model
	Title   string `gorm:"type:varchar(255);not null;comment:标题"`
	Content string `gorm:"type:varchar(255);not null;comment:内容"`
}

type Good struct {
	gorm.Model
	ArticleId int `gorm:"type:int(11);not null;comment:文章ID"`
	Num       int `gorm:"type:int(11);not null;comment:点赞数量"`
}

type Discuss struct {
	gorm.Model
	ArticleId int    `gorm:"type:int(11);not null;comment:文章ID"`
	Content   string `gorm:"type:varchar(255);not null;comment:内容"`
	Num       int    `gorm:"type:int(11);not null;comment:点赞数量"`
}

type Reply struct {
	gorm.Model
	FatherId int    `gorm:"type:int(11);not null;comment:父级评论"`
	Content  string `gorm:"type:varchar(255);not null;comment:内容"`
	Num      int    `gorm:"type:int(11);not null;comment:点赞数量"`
}

type Statistics struct {
	gorm.Model
	ArticleId int    `gorm:"type:int(11);not null;comment:文章ID"`
	Content   string `gorm:"type:varchar(255);not null;comment:评论内容"`
	Num       int    `gorm:"type:int(11);not null;comment:评论数量"`
}
